package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * 预警结果对象 emp_early_warn_result
 *
 * @author zsl
 * @date 2024-04-15
 */
@Data
@TableName("emp_early_warn_result")
public class EmpEarlyWarnResult extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Excel(name = "主键ID", width = 12, sort = 1)
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 预警等级（字典）
     */
    @Excel(name = "预警等级", width = 16, readConverterExp = "1=超载区,2=临界区,3=盈余区", dictType = "early_warn_grade", combo = {"超载区", "临界区", "盈余区"}, sort = 2)
    private Long earlyWarnGrade;

    /**
     * 预警类型（字典）
     */
    @Excel(name = "预警类型", readConverterExp = "1=资源环境类,2=规划类,3=空间开发保护,4=人口经济活动", dictType = "early_warn_type", combo = {"资源环境类", "规划类", "空间开发保护", "人口经济活动"}, sort = 3)
    private Long earlyWarnType;

    /**
     * 采集ID（外键）
     */
    private Long collectId;

    /**
     * 指标采集
     */
    @Excels({
            @Excel(name = "指标属性名称", targetAttr = "empNormSystem.name", type = Excel.Type.EXPORT, sort = 5),
            @Excel(name = "行政区域名称", targetAttr = "empArea.name", type = Excel.Type.EXPORT, sort = 6)
    })
    @TableField(exist = false)
    private EmpNormCollect normCollect;

    /**
     * 时间（年）
     */
    @Excel(name = "时间", width = 16, sort = 4)
    @TableField(value = "`year`")
    private String year;

    /**
     * 指标描述
     */
    @Excel(name = "指标描述", height = 32, sort = 7)
    @TableField(value = "`describe`")
    private String describe;

    /**
     * 增加值
     */
    @Excel(name = "增加值", sort = 8)
    private String addValue;

    /**
     * 最后值
     */
    @Excel(name = "最后值", sort = 9)
    @TableField(value = "`last_value`")
    private String lastValue;

    /**
     * 模型方案ID（外键）
     */
    private Long schemeId;

    @Excels({
            @Excel(name = "方案名称", targetAttr = "name", type = Excel.Type.EXPORT, sort = 10)
    })
    @TableField(exist = false)
    private EmpModelScheme empModelScheme;

    @Excel(name = "指标属性名称", type = Excel.Type.IMPORT, prompt = "若名称匹配不上，将自动忽略该条记录，导入之前请认真核对数据", sort = 5)
    @TableField(exist = false)
    private String attributeName;

    @Excel(name = "行政区域名称", type = Excel.Type.IMPORT, prompt = "若名称匹配不上，将自动忽略该条记录，导入之前请认真核对数据", sort = 6)
    @TableField(exist = false)
    private String areaName;

    @Excel(name = "方案名称", type = Excel.Type.IMPORT, prompt = "若名称匹配不上，将自动忽略该条记录，导入之前请认真核对数据", sort = 10)
    @TableField(exist = false)
    private String modelSchemeName;

}
